Hardware trace data provides a log of instructions executed by a processor. Trace data may also include information about data that is read from and written to memory as well as information about when context switches and interrupts occur. This allows software engineers to examine interactions between tasks and interrupts in a system which is particularly helpful for debugging software executed in embedded systems where utilizing normal code instrumentation may be difficult. Trace data does not require modifying aspects of a program to collect data. Thus, systems with tight timing margins need not be affected by the addition of code in order to generate the trace data.
Collecting a log of instructions and/or data values may require a large amount of storage space. In the past, some systems utilized trace capture boxes. Trace capture boxes provide a high bandwidth, large volume storage medium for storing trace data off chip and off board memory. Trace capture boxes, however, were relatively expensive and proved to be a costly solution that was undesirable for system designers.
Other approaches in the past included attempt to compress the trace data in order to reduce the amount of storage space required for on chip and on board memories and also to reduce bandwidth requirements. The traditional compression techniques used, however, provided only marginal improvements.
Thus, what is needed is an efficient and effective method and apparatus for performing trace data compression.